#include <iostream>
#include <thread>
#include "output_integer.h"

int main() {
    for (int i = 0; i < 8; i++) {
        std::thread t(output, i);
        t.join();
    }
    auto fn = [](int *a) {
        for (int i = 0; i < 10; i++)
            std::cout << *a << "\n";
    };

    [] {
        int a = 100;
        std::thread t(fn, &a);
        t.detach();
    }();
    return 0;
}